<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>佐心，教家长做父母</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${ctx}/assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="${ctx}/assets/css/index.css?v=2.3">
</head>
<body class="bg-gray">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed am-border-bottom">
    <div class="am-header-left am-header-nav">
        <a onclick="history.go(-1)"> <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        免费提问
    </h1>

</header>
<section class="am-padding-bottom-sm" id="amz-main" data-tag="css-nav">

    <!--切换tab-->
    <div data-am-widget="tabs"
         class="am-tabs am-tabs-d2 font-14 bg-white am-margin-top-sm pinglun-tabs am-border-bottom">
        <ul class="am-tabs-nav am-cf">
            <li class="am-active bg-white  ">
                <div class="width-100 border-right margin-top-6 height-30" id="quanbu"><a>全部</a></div>
            </li>
            <li class="bg-white">
                <div class="width-100 border-right margin-top-6 height-30" id="dwc"><a>待完成</a></div>
            </li>
            <li class="bg-white">
                <div class="width-100 border-right margin-top-6 height-30" id="dpj"><a>待评价</a></div>
            </li>
            <li class="bg-white">
                <div class="width-100  margin-top-6 height-30" id="ywc"><a>已完成</a></div>
            </li>
        </ul>
    </div>
    <!--列表-->
    <div class="margin-top-42 order_list">
    </div>
    
    <!--隐藏音频-->
    <div class="am-hide">
        <audio src=""  id="audio">亲 您的浏览器不支持html5的audio标签</audio>
    </div>
</section>
<div class="am-modal am-modal-prompt" tabindex="-1" id="my-huifu">
    <div class="am-modal-dialog">
        <div class="am-modal-hd">回复</div>
        <div class="am-modal-bd">
            <div class="  font-14">
                <div class="border-1 font-color-16 ">
                    <div class=" ">
                        <textarea rows="4" id="txt_question_content" class="question_content am-hide" placeholder="请输入问题描述"></textarea>
                    </div>
                    <div class="box font-color-12">
                        <div class="width-60px am-text-center" id="btntext">
                            <div class="icon_45"></div>
                            <div>文本</div>
                        </div>
                        <div class="width-60px am-text-center" id="btnvoice">
                            <div class="icon_46 "></div>
                            <div ><span id="font_voice">语言</span></div>
                        </div>
                    </div>
                </div>

            </div>  </div>
        <div class="am-modal-footer">
            <span class="am-modal-btn" data-am-modal-cancel>取消</span>
            <span class="am-modal-btn" data-am-modal-confirm>确认</span>
        </div>
    </div>
</div>
<script src="${ctx}/assets/js/jquery.min.js"></script>
<script src="${ctx}/assets/js/amazeui.min.js"></script>
<script>
    $(function() {
        //$('.order_list').find('.huifu').on('click', function() {

        //    $('#my-huifu').modal({
         //       relatedTarget: this,
         //       onConfirm: function(options) {
         //           var $link = $(this.relatedTarget);
         //           var msg = $link.length ? '你要回复的 ID 为 ' + $link.data('id') :
         //                   '什么玩意';
          //          alert(msg);
         //       },
         //       onCancel: function() {

         //       }
         //   });
       // });


    });
</script>

<script>
		var freeAskList=$.ajax({url:"${ctx}/getFreeAskList",async:false});
        var freeAskJson=JSON.parse(freeAskList.responseText);
        
        if(freeAskJson.resultCode=="0"){
        	for(var i=0;i<freeAskJson.freeAskList.length;i++){
	        	var html="";
	        	var userList=$.ajax({url:"${ctx}/getUserData?userId="+freeAskJson.freeAskList[i].userId,async:false});
       	    	var userJson=JSON.parse(userList.responseText);
	        	
	        	html+="<div class='order_item bg-white border-bottom am-margin-bottom-sm am-padding-top-sm'>";
	        	html+="<div onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>";
	            html+="<div class=' bg-gray am-margin-left-sm am-margin-right-sm ' >";
	            html+="    <div class='am-g   am-padding-top-sm am-padding-bottom-xs border-1'>";
	            html+="        <div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
	            html+="            <a class=''>";
	            html+="                <img class='img-65' src='"+userJson.wxUser.headimgurl+"'/>";
	            html+="            </a>";
	            html+="            <i class='icon_12'></i>";
	            html+="        </div>";
	            html+="        <div class=' am-u-sm-9 am-list-main'>";
	            html+="            <div class='am-list-item-hd font-color-main'>";
	                            html+=""+userJson.wxUser.nickname;
	            html+="            </div>";
	            html+="            <div class='font-12  font-color-11'>";
	            html+="                "+userJson.wxUser.telephone;
	            html+="            </div>";
	            html+="            <div class='font-14  font-color-main am-text-truncate'>";
	            if(freeAskJson.freeAskList[i].type==0){              
	                            html+=""+freeAskJson.freeAskList[i].question;
	            }else{
		 			html+="<div class='btn_18 voice' >";
		 			html+="<input type='hidden' value='"+freeAskJson.freeAskList[i].question+"'>";
		            html+="<i class='icon_711 '></i><span></span>";
		            html+="</div>";
         		}
	                            
	            html+="            </div>";
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	            html+="<div class='am-padding-left-lg am-padding-right-sm '>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm am-margin-top-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_04_1'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 ' >";
	                        html+="咨询方式：免费提问";
	            html+="        </div>";
	            html+="    </div>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_68_2'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 '>";
	                        html+="提问时间："+freeAskJson.freeAskList[i].askTimeStr;
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	        	html+="</div>";
	            html+="<div class='am-padding-left-sm am-padding-right-sm font-14 am-padding-bottom-sm'>";
	            
	            if(freeAskJson.freeAskList[i].status==0){
	            	html+="<div class='btn-4 word-space-2 padding-left-0 huifu' data-id='1' onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>回复</div>";
	            }else if(freeAskJson.freeAskList[i].status==1){
	            	html+="<div class='am-g am-text-center font-color-16 am-padding-top-xs am-padding-bottom-xs border-tops'>";
                    html+="<div class='am-u-sm-12  ' >已回复，等待用户评价</div>";
                	html+="</div>";
	            }
	            html+="</div>";
	        	html+="</div>";    
	        	$(".order_list").append(html);    	
        	}
        	
        }

	$("#quanbu").on("click",function(){
		var freeAskList=$.ajax({url:"${ctx}/getFreeAskList",async:false});
        var freeAskJson=JSON.parse(freeAskList.responseText);
        
        if(freeAskJson.resultCode=="0"){
        	$(".order_list").html("");
        	for(var i=0;i<freeAskJson.freeAskList.length;i++){
	        	var html="";
	        	var userList=$.ajax({url:"${ctx}/getUserData?userId="+freeAskJson.freeAskList[i].userId,async:false});
       	    	var userJson=JSON.parse(userList.responseText);
	        	html+="<div class='order_item bg-white border-bottom am-margin-bottom-sm am-padding-top-sm'>";
	        	html+="<div onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>";
	            html+="<div class=' bg-gray am-margin-left-sm am-margin-right-sm ' >";
	            html+="    <div class='am-g   am-padding-top-sm am-padding-bottom-xs border-1'>";
	            html+="        <div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
	            html+="            <a class=''>";
	            html+="                <img class='img-65' src='"+userJson.wxUser.headimgurl+"'/>";
	            html+="            </a>";
	            html+="            <i class='icon_12'></i>";
	            html+="        </div>";
	            html+="        <div class=' am-u-sm-9 am-list-main'>";
	            html+="            <div class='am-list-item-hd font-color-main'>";
	                            html+=""+userJson.wxUser.nickname;
	            html+="            </div>";
	            html+="            <div class='font-12  font-color-11'>";
	            html+="                "+userJson.wxUser.telephone;
	            html+="            </div>";
	            html+="            <div class='font-14  font-color-main am-text-truncate'>";
	            if(freeAskJson.freeAskList[i].type==0){              
	                            html+=""+freeAskJson.freeAskList[i].question;
	            }else{
		 			html+="<div class='btn_18 voice' >";
		 			html+="<input type='hidden' value='"+freeAskJson.freeAskList[i].question+"'>";
		            html+="<i class='icon_711 '></i><span></span>";
		            html+="</div>";
         		}
	                            
	            html+="            </div>";
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	            html+="<div class='am-padding-left-lg am-padding-right-sm '>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm am-margin-top-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_04_1'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 ' >";
	                        html+="咨询方式：免费提问";
	            html+="        </div>";
	            html+="    </div>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_68_2'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 '>";
	                        html+="提问时间："+freeAskJson.freeAskList[i].askTimeStr;
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	        	html+="</div>";
	            html+="<div class='am-padding-left-sm am-padding-right-sm font-14 am-padding-bottom-sm'>";
	            
	            if(freeAskJson.freeAskList[i].status==0){
	            	html+="<div class='btn-4 word-space-2 padding-left-0 huifu' data-id='1' onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>回复</div>";
	            }else if(freeAskJson.freeAskList[i].status==1){
	            	html+="<div class='am-g am-text-center font-color-16 am-padding-top-xs am-padding-bottom-xs border-tops'>";
                    html+="<div class='am-u-sm-12  ' >已回复，等待用户评价</div>";
                	html+="</div>";
	            }
	            html+="</div>";
	        	html+="</div>";    
	        	$(".order_list").append(html);   
        	}
        }
    });
	
	$("#ywc").on("click",function(){
	var freeAskList=$.ajax({url:"${ctx}/getFreeAskList",async:false});
        var freeAskJson=JSON.parse(freeAskList.responseText);
        
        if(freeAskJson.resultCode=="0"){
        	$(".order_list").html("");
        	for(var i=0;i<freeAskJson.freeAskList.length;i++){
        		if(freeAskJson.freeAskList[i].status==2){
	        	var html="";
	        	var userList=$.ajax({url:"${ctx}/getUserData?userId="+freeAskJson.freeAskList[i].userId,async:false});
       	    	var userJson=JSON.parse(userList.responseText);
	        	
	        	html+="<div class='order_item bg-white border-bottom am-margin-bottom-sm am-padding-top-sm'>";
	        	html+="<div onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>";
	            html+="<div class=' bg-gray am-margin-left-sm am-margin-right-sm ' >";
	            html+="    <div class='am-g   am-padding-top-sm am-padding-bottom-xs border-1'>";
	            html+="        <div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
	            html+="            <a class=''>";
	            html+="                <img class='img-65' src='"+userJson.wxUser.headimgurl+"'/>";
	            html+="            </a>";
	            html+="            <i class='icon_12'></i>";
	            html+="        </div>";
	            html+="        <div class=' am-u-sm-9 am-list-main'>";
	            html+="            <div class='am-list-item-hd font-color-main'>";
	                            html+=""+userJson.wxUser.nickname;
	            html+="            </div>";
	            html+="            <div class='font-12  font-color-11'>";
	            html+="                "+userJson.wxUser.telephone;
	            html+="            </div>";
	            html+="            <div class='font-14  font-color-main am-text-truncate'>";
	            if(freeAskJson.freeAskList[i].type==0){              
	                            html+=""+freeAskJson.freeAskList[i].question;
	            }else{
		 			html+="<div class='btn_18 voice' >";
		 			html+="<input type='hidden' value='"+freeAskJson.freeAskList[i].question+"'>";
		            html+="<i class='icon_711 '></i><span></span>";
		            html+="</div>";
         		}
	                            
	            html+="            </div>";
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	            html+="<div class='am-padding-left-lg am-padding-right-sm '>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm am-margin-top-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_04_1'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 ' >";
	                        html+="咨询方式：免费提问";
	            html+="        </div>";
	            html+="    </div>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_68_2'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 '>";
	                        html+="提问时间："+freeAskJson.freeAskList[i].askTimeStr;
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	        	html+="</div>";
	            html+="<div class='am-padding-left-sm am-padding-right-sm font-14 am-padding-bottom-sm'>";
	            
	            if(freeAskJson.freeAskList[i].status==0){
	            	html+="<div class='btn-4 word-space-2 padding-left-0 huifu' data-id='1' onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>回复</div>";
	            }else if(freeAskJson.freeAskList[i].status==1){
	            	html+="<div class='am-g am-text-center font-color-16 am-padding-top-xs am-padding-bottom-xs border-tops'>";
                    html+="<div class='am-u-sm-12  ' >已回复，等待用户评价</div>";
                	html+="</div>";
	            }
	            html+="</div>";
	        	html+="</div>";    
	        	$(".order_list").append(html);   
	        	} 	
        	}
        	
        }
    });
	
	
	$("#dpj").on("click",function(){
	var freeAskList=$.ajax({url:"${ctx}/getFreeAskList",async:false});
        var freeAskJson=JSON.parse(freeAskList.responseText);
        
        if(freeAskJson.resultCode=="0"){
        	$(".order_list").html("");
        	for(var i=0;i<freeAskJson.freeAskList.length;i++){
        		if(freeAskJson.freeAskList[i].status==1){
	        	var html="";
	        	var userList=$.ajax({url:"${ctx}/getUserData?userId="+freeAskJson.freeAskList[i].userId,async:false});
       	    	var userJson=JSON.parse(userList.responseText);
	        	
	        	html+="<div class='order_item bg-white border-bottom am-margin-bottom-sm am-padding-top-sm'>";
	        	html+="<div onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>";
	            html+="<div class=' bg-gray am-margin-left-sm am-margin-right-sm ' >";
	            html+="    <div class='am-g   am-padding-top-sm am-padding-bottom-xs border-1'>";
	            html+="        <div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
	            html+="            <a class=''>";
	            html+="                <img class='img-65' src='"+userJson.wxUser.headimgurl+"'/>";
	            html+="            </a>";
	            html+="            <i class='icon_12'></i>";
	            html+="        </div>";
	            html+="        <div class=' am-u-sm-9 am-list-main'>";
	            html+="            <div class='am-list-item-hd font-color-main'>";
	                            html+=""+userJson.wxUser.nickname;
	            html+="            </div>";
	            html+="            <div class='font-12  font-color-11'>";
	            html+="                "+userJson.wxUser.telephone;
	            html+="            </div>";
	            html+="            <div class='font-14  font-color-main am-text-truncate'>";
	            if(freeAskJson.freeAskList[i].type==0){              
	                            html+=""+freeAskJson.freeAskList[i].question;
	            }else{
		 			html+="<div class='btn_18 voice' >";
		 			html+="<input type='hidden' value='"+freeAskJson.freeAskList[i].question+"'>";
		            html+="<i class='icon_711 '></i><span></span>";
		            html+="</div>";
         		}
	                            
	            html+="            </div>";
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	            html+="<div class='am-padding-left-lg am-padding-right-sm '>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm am-margin-top-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_04_1'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 ' >";
	                        html+="咨询方式：免费提问";
	            html+="        </div>";
	            html+="    </div>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_68_2'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 '>";
	                        html+="提问时间："+freeAskJson.freeAskList[i].askTimeStr;
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	        	html+="</div>";
	            html+="<div class='am-padding-left-sm am-padding-right-sm font-14 am-padding-bottom-sm'>";
	            
	            if(freeAskJson.freeAskList[i].status==0){
	            	html+="<div class='btn-4 word-space-2 padding-left-0 huifu' data-id='1' onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>回复</div>";
	            }else if(freeAskJson.freeAskList[i].status==1){
	            	html+="<div class='am-g am-text-center font-color-16 am-padding-top-xs am-padding-bottom-xs border-tops'>";
                    html+="<div class='am-u-sm-12  ' >已回复，等待用户评价</div>";
                	html+="</div>";
	            }
	            html+="</div>";
	        	html+="</div>";    
	        	$(".order_list").append(html);   
	        	} 	
        	}
        	
        }
    });

    $("#dwc").on("click",function(){
    	var freeAskList=$.ajax({url:"${ctx}/getFreeAskList",async:false});
        var freeAskJson=JSON.parse(freeAskList.responseText);
        
        if(freeAskJson.resultCode=="0"){
        	$(".order_list").html("");
        	for(var i=0;i<freeAskJson.freeAskList.length;i++){
        		if(freeAskJson.freeAskList[i].status==0){
	        	var html="";
	        	var userList=$.ajax({url:"${ctx}/getUserData?userId="+freeAskJson.freeAskList[i].userId,async:false});
       	    	var userJson=JSON.parse(userList.responseText);
	        	
	        	html+="<div class='order_item bg-white border-bottom am-margin-bottom-sm am-padding-top-sm'>";
	        	html+="<div onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>";
	            html+="<div class=' bg-gray am-margin-left-sm am-margin-right-sm ' >";
	            html+="    <div class='am-g   am-padding-top-sm am-padding-bottom-xs border-1'>";
	            html+="        <div class='am-u-sm-3 am-list-thumb am-padding-left-sm'>";
	            html+="            <a class=''>";
	            html+="                <img class='img-65' src='"+userJson.wxUser.headimgurl+"'/>";
	            html+="            </a>";
	            html+="            <i class='icon_12'></i>";
	            html+="        </div>";
	            html+="        <div class=' am-u-sm-9 am-list-main'>";
	            html+="            <div class='am-list-item-hd font-color-main'>";
	                            html+=""+userJson.wxUser.nickname;
	            html+="            </div>";
	            html+="            <div class='font-12  font-color-11'>";
	            html+="                "+userJson.wxUser.telephone;
	            html+="            </div>";
	            html+="            <div class='font-14  font-color-main am-text-truncate'>";
	            if(freeAskJson.freeAskList[i].type==0){              
	                            html+=""+freeAskJson.freeAskList[i].question;
	            }else{
		 			html+="<div class='btn_18 voice' >";
		 			html+="<input type='hidden' value='"+freeAskJson.freeAskList[i].question+"'>";
		            html+="<i class='icon_711 '></i><span></span>";
		            html+="</div>";
         		}
	                            
	            html+="            </div>";
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	            html+="<div class='am-padding-left-lg am-padding-right-sm '>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm am-margin-top-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_04_1'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 ' >";
	                        html+="咨询方式：免费提问";
	            html+="        </div>";
	            html+="    </div>";
	            html+="    <div class='box font-color-13 am-margin-bottom-sm'>";
	            html+="        <div class='width-35px'>";
	            html+="            <div class='icon_68_2'></div>";
	            html+="        </div>";
	            html+="        <div class='box-1 '>";
	                        html+="提问时间："+freeAskJson.freeAskList[i].askTimeStr;
	            html+="        </div>";
	            html+="    </div>";
	            html+="</div>";
	        	html+="</div>";
	            html+="<div class='am-padding-left-sm am-padding-right-sm font-14 am-padding-bottom-sm'>";
	            
	            if(freeAskJson.freeAskList[i].status==0){
	            	html+="<div class='btn-4 word-space-2 padding-left-0 huifu' data-id='1' onclick='window.location.href=\"${ctx}/gotoHuifuAsk?askId="+freeAskJson.freeAskList[i].id+"\"'>回复</div>";
	            }else if(freeAskJson.freeAskList[i].status==1){
	            	html+="<div class='am-g am-text-center font-color-16 am-padding-top-xs am-padding-bottom-xs border-tops'>";
                    html+="<div class='am-u-sm-12  ' >已回复，等待用户评价</div>";
                	html+="</div>";
	            }
	            html+="</div>";
	        	html+="</div>";    
	        	$(".order_list").append(html);   
	        	} 	
        	}
        	
        }
    });
    $("#btntext").on("click",function(){

        var $voices=$("#btnvoice").find(".icon_46");
        $("#font_voice").text("语言");
        $voices.removeClass("cur");

        $("#txt_question_content").removeClass("am-hide").focus();

    });

    $(".order_item .voice").on("click",function(){
          var audio = document.getElementById("audio");
          audio.src=$(this).find("input").val(); 
          
           var eventTester = function(e){
                audio.addEventListener(e,function(){
                    $voices.removeClass("cur");
                },false);
            };
            eventTester("ended");
          
          var $voices= $(this).find(".icon_711");
            $(".report_item .voice").find(".icon_711").remove("cur");
            if($voices.hasClass("cur")){
                $voices.removeClass("cur");
                audio.pause();
            }else{
                $voices.addClass("cur");
                audio.play();
            }
        });
</script>

</body>
</html>